/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;
import java.util.Date;

/**
 * <p>Project: javase202202 - Arr2D2
 * <p>Powered by Lisi On 2022-06-06 14:21:38
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Arr2D2 {
    public static void main(String[] args) {
        var n = new int[][]{
                {1,2,3,4,5}, //0
                {11,22},//1
                {100,200,300,400}//2 [2][3]
        };
        System.out.println(n[1][1]);
        n[2][3]=4000;
        System.out.println(n[2][3]);


        Object[] objs = new Object[6];
        objs[0] = 1;
        objs[1] = .5;
        objs[2] = "hello world";
        objs[3] = new Date();


        Object aaa = new Date();

        //for(int[] a :n){
        //    System.out.println(Arrays.toString(a));
        ///}
        for(int i=0;i<n.length;i++){
            for(int j=0;j<n[i].length;j++) {
                System.out.printf("n[%d][%d] = %d %n", i,j,n[i][j]);
            }
            System.out.println("-".repeat(50));
        }

    }
}
